# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapybladerf
pkgver=0.4.1
_pkgname=SoapyBladeRF
_gitver=soapy-bladerf-$pkgver
pkgrel=4
pkgdesc='Soapy SDR plugin for the BladeRF'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyBladeRF'
license=('GPL3')
depends=('soapysdr' 'bladerf')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('73cd5c56b6f2faa37fb8eb8aca359061fd2da94fb081c1eb60f61894385f5f0175c9e3955835dc38478e513b0fd5a15fd100123be89e4ad62a0b7134557ab73e')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

